package Threadstudy;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

public class CountRoot {
	public void count(){
		List<CountThread> cts=new ArrayList();
		File[] f=File.listRoots();
		for(int i=0;i<f.length;i++){
			CountThread ct=new CountThread(f[i].getAbsolutePath());
			cts.add(ct);
			ct.start();
		}
		MoniterThread mt=new MoniterThread(cts);
		mt.start();
	}
	public static void main(String args[]){
		CountRoot cr=new CountRoot();
		cr.count();
	}
}
